  <?$form=$this->beginWidget('CActiveForm', array(
        'id'=>'addcompany-form',
        'enableAjaxValidation'=>true,
        'htmlOptions' => array('enctype' => 'multipart/form-data' )
    )); ?>
    <?=$form->errorSummary($model); ?>


					<div class="line" >
						<?=$form->label($model,'title'); ?>
                        <?=CHtml::activeTextField($model,'title',array('class'=>'xl')); ?>
					</div>

                    <div class="line" >
						<?=$form->label($model,'address'); ?>
                         <?=CHtml::activeTextField($model,'address',array('class'=>'xl')); ?>
					</div>

                    <div class="line" >
                        <?=$form->label($model,'phone'); ?>
                        <?=CHtml::activeTextField($model,'phone',array('class'=>'small')); ?>
					</div>

                    <div class="line" >
                        <?=$form->label($model,'fax'); ?>
                        <?=CHtml::activeTextField($model,'fax',array('class'=>'small')); ?>
					</div>

                    <div class="line" >
                        <?=$form->label($model,'site'); ?>
                        <?=CHtml::activeTextField($model,'site',array('class'=>'small')); ?>
					</div>
                    <div class="line" >
                        <?=$form->label($model,'email'); ?>
                        <?=CHtml::activeTextField($model,'email',array('class'=>'small')); ?>
					</div>

                    <div class="line" >
                        <?=$form->label($model,'map_longitude'); ?>
                        <?=CHtml::activeTextField($model,'map_longitude',array('class'=>'small')); ?>
					</div>

                    <div class="line" >
                        <?=$form->label($model,'map_latitude'); ?>
                        <?=CHtml::activeTextField($model,'map_latitude',array('class'=>'small')); ?>
					</div>

                    <div class="line" >
                        <?=$form->label($model,'INN'); ?>
                        <?=CHtml::activeTextField($model,'INN',array('class'=>'small')); ?>
					</div>

                    <div class="line">
                        <?=$form->label($model,'licence'); ?>
                                                <?php //you can use any desired dir to install this extension
 $this->widget('application.extensions.elrtef.elRTE', array(
        'model' => $model,
        'attribute' => 'licence',
        //'name' => 'text',
        //'htmlOptions' => array('height' => '600'),
        'options' => array(
                'doctype'=>'js:\'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\'',
                'cssClass' => 'el-rte',
                'cssfiles' => array('css/elrte-inner.css'),
                'absoluteURLs'=>true,
                'allowSource' => true,
                'lang' => 'ru',
                'styleWithCss'=>'',
                'height' => 300,
                'fmAllow'=>true, //if you want to use Media-manager
                'fmOpen'=>'js:function(callback) {$("<div id=\"elfinder\" />").elfinder(%elfopts%);}',//here used placeholder for settings
                'toolbar' => 'maxi',
        ),
        'elfoptions' => array( //elfinder options
            'url'=>'auto',  //if set auto - script tries to connect with native connector
            'passkey'=>'mypass', //here passkey from first connector`s line
            'lang'=>'ru',
            'dialog'=>array('width'=>'900','modal'=>true,'title'=>'Файл-менеджер'),
            'closeOnEditorCallback'=>true,
            'editorCallback'=>'js:callback'
        ),
        )
);
?>
                    </div>

                    <div class="line">
                        <?=$form->label($model,'desc'); ?>
                                                <?php //you can use any desired dir to install this extension
 $this->widget('application.extensions.elrtef.elRTE', array(
        'model' => $model,
        'attribute' => 'desc',
        //'name' => 'text',
        //'htmlOptions' => array('height' => '600'),
        'options' => array(
                'doctype'=>'js:\'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\'',
                'cssClass' => 'el-rte',
                'cssfiles' => array('css/elrte-inner.css'),
                'absoluteURLs'=>true,
                'allowSource' => true,
                'lang' => 'ru',
                'styleWithCss'=>'',
                'height' => 300,
                'fmAllow'=>true, //if you want to use Media-manager
                'fmOpen'=>'js:function(callback) {$("<div id=\"elfinder\" />").elfinder(%elfopts%);}',//here used placeholder for settings
                'toolbar' => 'maxi',
        ),
        'elfoptions' => array( //elfinder options
            'url'=>'auto',  //if set auto - script tries to connect with native connector
            'passkey'=>'mypass', //here passkey from first connector`s line
            'lang'=>'ru',
            'dialog'=>array('width'=>'900','modal'=>true,'title'=>'Файл-менеджер'),
            'closeOnEditorCallback'=>true,
            'editorCallback'=>'js:callback'
        ),
        )
);
?>
                    </div>

                    <!-- div class="line">
    <? if(isset($model->logo)):?>
    <p>
    <a href="<?=$model->logo?>" class="zoom tooltip" original-title="<?=Yii::t('app','Загруженный логотип')?>">
         <img src="<?=$model->logo?>">
    </a><br/>
    <a href="<?=$this->createUrl('/mancompanies/delimg',array('id'=>$model->id));?>"><?=Yii::t('app','Удалить логотип')?></a>
    </p>
    <?endif?>

						<?=$form->label($model,'logo'); ?>
						<?php echo CHtml::activeFileField($model, 'logo',array('name'=>'mainPic')); ?>
					</div -->


    <div class="line">
		<?php echo $form->labelEx($model,'moder_id'); ?>
		<?php echo $form->dropDownList($model,'moder_id', $moderators, array('value' => $model->moder_id)); ?>
		<?php echo $form->error($model,'moder_id'); ?>
	</div>

                    <div class="line button">

                                            <button type="submit" class="green medium"><span><?=Yii::t('app','Сохранить');?></span></button>
                                            <button type="submit" onclick="window.location.replace('<?=$this->createUrl("mancompanies/")?>');return false; " class="blue medium"><span>Отмена</span></button>

                                        </div>

    <?$this->endWidget(); ?>

			</div>